Skip to content

Conversation

@damian-molinski
Copy link
Contributor

Description

Sub-feature PR with database optimization efforts

Related Issue(s)

Resolves #3528

Description of Changes

See commit (PRs) history

damian-molinski and others added 2 commits November 5, 2025 10:13
* docs: capture initial times

* chore: remove cacheDocument

* turn off logging

* chore: use debugPrint instead of logger

* feat: bulk documents save

* batching sync

* chore: move exact ref resoling to getDocumentData instead of index

* fix: DocumentRepository

* chore: simplify getting documents data

* remove getAllDocumentsRefs and getCachedDocumentsRefs from DocumentRepository. Index is only available in DocumentDataRemoteSource

* chore: update docs

* simplified document index endpoint

* remove randomness from LocalCatGateway

* indexing by batch size

* wip: filtering by types

* Rework filtering refs + checking all refs if already cached in parallel

* docs

* update indexing.csv

* update indexing csv

* chore: cleanup

* trailing new line

* chore

* move performance tab to docs

* bulk saving typed docs in parallel

* chore: revert hardcoded timestamp

* chore: typos

* split _sync into smaller functions + add documentation

* little refactor

* fix: analyzer

* initial v2 tables

* wip

* wip

* feat: database migration

* chore: cleanup

* bump batch size

* cleanup

* chore: remove defensive content decoding

* spelling

* test on platform

* chore: update build scripts

* more migration test data

* clean up constructors

* cleanup

* fix: template tests

* fix: spelling

* fix code-generator earthly target

* use logger in migration + wrap in transaction

* chore: move migration transaction level higher
* docs: capture initial times

* chore: remove cacheDocument

* turn off logging

* chore: use debugPrint instead of logger

* feat: bulk documents save

* batching sync

* chore: move exact ref resoling to getDocumentData instead of index

* fix: DocumentRepository

* chore: simplify getting documents data

* remove getAllDocumentsRefs and getCachedDocumentsRefs from DocumentRepository. Index is only available in DocumentDataRemoteSource

* chore: update docs

* simplified document index endpoint

* remove randomness from LocalCatGateway

* indexing by batch size

* wip: filtering by types

* Rework filtering refs + checking all refs if already cached in parallel

* docs

* update indexing.csv

* update indexing csv

* chore: cleanup

* trailing new line

* chore

* move performance tab to docs

* bulk saving typed docs in parallel

* chore: revert hardcoded timestamp

* chore: typos

* split _sync into smaller functions + add documentation

* little refactor

* fix: analyzer

* initial v2 tables

* wip

* wip

* feat: database migration

* chore: cleanup

* bump batch size

* cleanup

* chore: remove defensive content decoding

* chore: daos

* spelling

* saveAll

* test on platform

* chore: update build scripts

* feat: DocumentsV2Dao methods

* simple proposals pagination query

* chore: create a JoinedProposalBriefEntity

* rename method

* feat: exclude hidden proposals

* more tests

* renaming and splitting logic into smaller parts

* feat: per language strategy

* remove CatalystDatabaseLanguage in favor of raw queries as they are easier to mange

* remove Index Strategy Documentation

* handle case where ref is empty

* migration now includes indexes

* use v2 documents table for saveAll and isCachedBulk

* adds ActionType to JoinedProposalBriefEntity

* adds versionIds to JoinedProposalBriefEntity

* comments count

* adds isFavorite to JoinedProposalBriefEntity

* add template to JoinedProposalBriefEntity

* adds documentsLocalMetadata table for auto updates

* Update docs

* use v2 proposals query for discovery most recent section

* feat: simplify most recent proposals section

* add proposal fav status for v2 tables

* local proposal fav status update

* update fav state locally for faster feedback

* self review

* fix tests

* update times

* fix: analyzer

* more migration test data

* clean up constructors

* cleanup

* fix: template tests

* spelling

* fix: spelling

* chore: PR review adjustments

* fix: add discovery specific colors (#3637)

* fix code-generator earthly target

* use logger in migration + wrap in transaction

---------

Co-authored-by: Ryszard Schossler <[email protected]>
@damian-molinski damian-molinski self-assigned this Nov 5, 2025
@damian-molinski damian-molinski added the squad: face Frontend Catalyst Experience Team label Nov 5, 2025
@damian-molinski damian-molinski moved this from New to 🏗 In progress in Catalyst Nov 5, 2025
@damian-molinski damian-molinski added the no-track Used to skip tracking in Swarmia analytics, etc. label Nov 6, 2025
damian-molinski and others added 11 commits November 7, 2025 08:20
* docs: capture initial times

* chore: remove cacheDocument

* turn off logging

* chore: use debugPrint instead of logger

* feat: bulk documents save

* batching sync

* chore: move exact ref resoling to getDocumentData instead of index

* fix: DocumentRepository

* chore: simplify getting documents data

* remove getAllDocumentsRefs and getCachedDocumentsRefs from DocumentRepository. Index is only available in DocumentDataRemoteSource

* chore: update docs

* simplified document index endpoint

* remove randomness from LocalCatGateway

* indexing by batch size

* wip: filtering by types

* Rework filtering refs + checking all refs if already cached in parallel

* docs

* update indexing.csv

* update indexing csv

* chore: cleanup

* trailing new line

* chore

* move performance tab to docs

* bulk saving typed docs in parallel

* chore: revert hardcoded timestamp

* chore: typos

* split _sync into smaller functions + add documentation

* little refactor

* fix: analyzer

* initial v2 tables

* wip

* wip

* feat: database migration

* chore: cleanup

* bump batch size

* cleanup

* chore: remove defensive content decoding

* chore: daos

* spelling

* saveAll

* test on platform

* chore: update build scripts

* feat: DocumentsV2Dao methods

* simple proposals pagination query

* chore: create a JoinedProposalBriefEntity

* rename method

* feat: exclude hidden proposals

* more tests

* renaming and splitting logic into smaller parts

* feat: per language strategy

* remove CatalystDatabaseLanguage in favor of raw queries as they are easier to mange

* remove Index Strategy Documentation

* handle case where ref is empty

* migration now includes indexes

* use v2 documents table for saveAll and isCachedBulk

* adds ActionType to JoinedProposalBriefEntity

* adds versionIds to JoinedProposalBriefEntity

* comments count

* adds isFavorite to JoinedProposalBriefEntity

* add template to JoinedProposalBriefEntity

* adds documentsLocalMetadata table for auto updates

* Update docs

* use v2 proposals query for discovery most recent section

* feat: simplify most recent proposals section

* add proposal fav status for v2 tables

* local proposal fav status update

* update fav state locally for faster feedback

* self review

* fix tests

* update times

* fix: analyzer

* more migration test data

* clean up constructors

* cleanup

* fix: template tests

* spelling

* fix: spelling

* chore: PR review adjustments

* add order parameter

* ProposalsOrder docs

* GetProposalsBriefPage supports order

* add filters object

* proposalsBriefPage filtering

* fix: status filtering

* more draft proposals filtering tests

* Campaign proposals filter

* update docs

* expose getVisibleProposalsCount and tests

* expose filters parameter

* integrate proposals page with v2 queries

* chore: increase time diff between proposals

* chore: reduce count query tables watched when not needed

* local proposals cubit

* local proposal fav staus update

* docs

* fix: add discovery specific colors (#3637)

* fix code-generator earthly target

* use logger in migration + wrap in transaction

* spelling

* rename category to categoryId for better consistency

* proposals per tab selector

* release completed in close

* extract early return logic into function

---------

Co-authored-by: Ryszard Schossler <[email protected]>
* docs: capture initial times

* chore: remove cacheDocument

* turn off logging

* chore: use debugPrint instead of logger

* feat: bulk documents save

* batching sync

* chore: move exact ref resoling to getDocumentData instead of index

* fix: DocumentRepository

* chore: simplify getting documents data

* remove getAllDocumentsRefs and getCachedDocumentsRefs from DocumentRepository. Index is only available in DocumentDataRemoteSource

* chore: update docs

* simplified document index endpoint

* remove randomness from LocalCatGateway

* indexing by batch size

* wip: filtering by types

* Rework filtering refs + checking all refs if already cached in parallel

* docs

* update indexing.csv

* update indexing csv

* chore: cleanup

* trailing new line

* chore

* move performance tab to docs

* bulk saving typed docs in parallel

* chore: revert hardcoded timestamp

* chore: typos

* split _sync into smaller functions + add documentation

* little refactor

* fix: analyzer

* initial v2 tables

* wip

* wip

* feat: database migration

* chore: cleanup

* bump batch size

* cleanup

* chore: remove defensive content decoding

* chore: daos

* spelling

* saveAll

* test on platform

* chore: update build scripts

* feat: DocumentsV2Dao methods

* simple proposals pagination query

* chore: create a JoinedProposalBriefEntity

* rename method

* feat: exclude hidden proposals

* more tests

* renaming and splitting logic into smaller parts

* feat: per language strategy

* remove CatalystDatabaseLanguage in favor of raw queries as they are easier to mange

* remove Index Strategy Documentation

* handle case where ref is empty

* migration now includes indexes

* use v2 documents table for saveAll and isCachedBulk

* adds ActionType to JoinedProposalBriefEntity

* adds versionIds to JoinedProposalBriefEntity

* comments count

* adds isFavorite to JoinedProposalBriefEntity

* add template to JoinedProposalBriefEntity

* adds documentsLocalMetadata table for auto updates

* Update docs

* use v2 proposals query for discovery most recent section

* feat: simplify most recent proposals section

* add proposal fav status for v2 tables

* local proposal fav status update

* update fav state locally for faster feedback

* self review

* fix tests

* update times

* fix: analyzer

* more migration test data

* clean up constructors

* cleanup

* fix: template tests

* spelling

* fix: spelling

* chore: PR review adjustments

* add order parameter

* ProposalsOrder docs

* GetProposalsBriefPage supports order

* add filters object

* proposalsBriefPage filtering

* fix: status filtering

* more draft proposals filtering tests

* Campaign proposals filter

* update docs

* expose getVisibleProposalsCount and tests

* expose filters parameter

* integrate proposals page with v2 queries

* chore: increase time diff between proposals

* chore: reduce count query tables watched when not needed

* local proposals cubit

* local proposal fav staus update

* docs

* fix: add discovery specific colors (#3637)

* fix code-generator earthly target

* use logger in migration + wrap in transaction

* spelling

* wip

* rename category to categoryId for better consistency

* adding vote data to ProposalBriefData

* fix: dependencies

* voting page + cubit integration - wip

* proposals per tab selector

* release completed in close

* extract early return logic into function

* Voting tabs selector + releasing completer on close

* move spaces blocs to shell page level

* fix: voting in grid view

* dummy voting integration

* chore: remove showComments

* docs: ProposalOrDocument

---------

Co-authored-by: Ryszard Schossler <[email protected]>
* docs: capture initial times

* chore: remove cacheDocument

* turn off logging

* chore: use debugPrint instead of logger

* feat: bulk documents save

* batching sync

* chore: move exact ref resoling to getDocumentData instead of index

* fix: DocumentRepository

* chore: simplify getting documents data

* remove getAllDocumentsRefs and getCachedDocumentsRefs from DocumentRepository. Index is only available in DocumentDataRemoteSource

* chore: update docs

* simplified document index endpoint

* remove randomness from LocalCatGateway

* indexing by batch size

* wip: filtering by types

* Rework filtering refs + checking all refs if already cached in parallel

* docs

* update indexing.csv

* update indexing csv

* chore: cleanup

* trailing new line

* chore

* move performance tab to docs

* bulk saving typed docs in parallel

* chore: revert hardcoded timestamp

* chore: typos

* split _sync into smaller functions + add documentation

* little refactor

* fix: analyzer

* initial v2 tables

* wip

* wip

* feat: database migration

* chore: cleanup

* bump batch size

* cleanup

* chore: remove defensive content decoding

* chore: daos

* spelling

* saveAll

* test on platform

* chore: update build scripts

* feat: DocumentsV2Dao methods

* simple proposals pagination query

* chore: create a JoinedProposalBriefEntity

* rename method

* feat: exclude hidden proposals

* more tests

* renaming and splitting logic into smaller parts

* feat: per language strategy

* remove CatalystDatabaseLanguage in favor of raw queries as they are easier to mange

* remove Index Strategy Documentation

* handle case where ref is empty

* migration now includes indexes

* use v2 documents table for saveAll and isCachedBulk

* adds ActionType to JoinedProposalBriefEntity

* adds versionIds to JoinedProposalBriefEntity

* comments count

* adds isFavorite to JoinedProposalBriefEntity

* add template to JoinedProposalBriefEntity

* adds documentsLocalMetadata table for auto updates

* Update docs

* use v2 proposals query for discovery most recent section

* feat: simplify most recent proposals section

* add proposal fav status for v2 tables

* local proposal fav status update

* update fav state locally for faster feedback

* self review

* fix tests

* update times

* fix: analyzer

* more migration test data

* clean up constructors

* cleanup

* fix: template tests

* spelling

* fix: spelling

* chore: PR review adjustments

* add order parameter

* ProposalsOrder docs

* GetProposalsBriefPage supports order

* add filters object

* proposalsBriefPage filtering

* fix: status filtering

* more draft proposals filtering tests

* Campaign proposals filter

* update docs

* expose getVisibleProposalsCount and tests

* expose filters parameter

* integrate proposals page with v2 queries

* chore: increase time diff between proposals

* chore: reduce count query tables watched when not needed

* local proposals cubit

* local proposal fav staus update

* docs

* fix: add discovery specific colors (#3637)

* fix code-generator earthly target

* use logger in migration + wrap in transaction

* spelling

* wip

* rename category to categoryId for better consistency

* adding vote data to ProposalBriefData

* fix: dependencies

* voting page + cubit integration - wip

* proposals per tab selector

* release completed in close

* extract early return logic into function

* Voting tabs selector + releasing completer on close

* move spaces blocs to shell page level

* fix: voting in grid view

* dummy voting integration

* chore: remove showComments

* docs: ProposalOrDocument

* create proposals/count query .csv files

* update proposals query times

* category indexes

* CatId parse and tryParse

* create new tables for authors

* update migration

* run database analyze after sync

* DocumentAuthors docs

* simpler copyWith

* cat.id keeps schema

* get rid of authorCatIdWithoutUsername column

* console profiler

* catId -> id

* times

* results notes

* spelling

* fix: analyzer

* update results (#3673)

* fix: readme

* remove CatalystRuntimeProfiler

* catId schema -> scheme

* rename

* bring back profiler to SignedDocumentManager, with debounce

---------

Co-authored-by: Ryszard Schossler <[email protected]>
* remove totalAsk and proposalsCount from campaign model

* proposalsCount -> finalProposalsCount

* CampaignCategoryViewModel.id -> CampaignCategoryViewModel.ref

* little DiscoveryCubit state build cleanup

* watch campaign total ask in discovery

* smaller voting category model

* new proposal campaign

* safe check

* proposal builder category total ask

* chore: missing TODO

* category details

* watch proposals template total ask

* finish integration of total_ask

* close

* remove print and add TODO

* documents getLatestOf

* categoryId -> categoryRef

* chore: make logger private

* feat: Make MultiCurrencyAmount immutable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-track Used to skip tracking in Swarmia analytics, etc. squad: face Frontend Catalyst Experience Team

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

2 participants